home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / packages / pctexps.def < prev    next >
Encoding:
Text File  |  1995-03-15  |  3.9 KB  |  124 lines

  1. %% 
  2. %% This is file `pctexps.def', generated on <1995/3/4> 
  3. %% with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% drivers.dtx  (with options: `pctexps,color3,colorfix')
  8. %% 
  9. %% IMPORTANT NOTICE:
  10. %% You are not allowed to distribute this file.
  11. %% For distribution of the original source see
  12. %% the copyright notice in the file drivers.dtx .
  13. %% 
  14. %% drivers.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
  15. %%
  16. %% This file is part of the Standard LaTeX `Graphics Bundle'.
  17. %%
  18. %% It should be distributed *unchanged* and together with all other
  19. %% files in the graphics bundle. The file 00readme.txt contains a list
  20. %% of all of these files.
  21. %%
  22. %% A modified version of this file may be distributed, but it should
  23. %% be distributed with a *different* name. Changed files must be
  24. %% distributed *together with a complete and unchanged* distribution
  25. %% of these files.
  26. %%
  27. \ProvidesFile{pctexps.def}
  28.         [1994/12/12 v2.6 Driver-dependant file (DPC,SPQR)]
  29. \def\c@lor@arg#1{%
  30.   \dimen@#1\p@
  31.   \ifdim\dimen@<\z@\dimen@\maxdimen\fi
  32.   \ifdim\dimen@>\p@
  33.     \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
  34.   \fi}
  35. \def\color@gray#1#2{%
  36.   \c@lor@arg{#2}%
  37.   \def#1{#2 setgray}%
  38.   }
  39. \def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
  40. \def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
  41.   \c@lor@arg{#1}%
  42.   \c@lor@arg{#2}%
  43.   \c@lor@arg{#3}%
  44.   \c@lor@arg{#4}%
  45.   \def#5{#1 #2 #3 #4 setcmykcolor}%
  46.   }
  47. \def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
  48. \def\c@lor@@rgb#1,#2,#3\@@#4{%
  49.   \c@lor@arg{#1}%
  50.   \c@lor@arg{#2}%
  51.   \c@lor@arg{#3}%
  52.   \def#4{#1 #2 #3 setrgbcolor}%
  53.   }
  54. \def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
  55. \def\c@lor@@hsb#1,#2,#3\@@#4{%
  56.   \c@lor@arg{#1}%
  57.   \c@lor@arg{#2}%
  58.   \c@lor@arg{#3}%
  59.   \def#4{#1 #2 #3 sethsbcolor}%
  60.   }
  61. \def\color@named#1#2{\c@lor@@named#2,,\@@#1}
  62. \def\c@lor@@named#1,#2,#3\@@#4{%
  63.   \@ifundefined{col@#1}%
  64.     {\PackageError{color}{Undefined color `#1'}\@ehd}%
  65.   {\edef#4{\csname col@#1\endcsname}}%
  66.   }
  67. \def\c@lor@to@ps#1\@@{#1}
  68. \def\current@color{0 setgray}
  69. \def\set@color{%
  70.   \Raw@PS{\current@color}\aftergroup\reset@color}
  71. \def\reset@color{\Raw@PS{\current@color}}
  72. \def\set@page@color{%
  73.   \c@lor@special\sixt@@n{background color ignored: \current@color}}
  74. \def\define@color@named#1#2{%
  75.   \expandafter\edef\csname col@#1\endcsname{#2}}
  76. \AtBeginDocument{%
  77.   \let\@ldc@l@r\color
  78.   \def\color{\if@inlabel\leavevmode\fi\@ldc@l@r}%
  79.   \let\@ldtextc@l@r\textcolor
  80.   \def\textcolor{\if@inlabel\leavevmode\fi\@ldtextc@l@r}%
  81.   \let\@lduseb@x\usebox
  82.   \def\usebox#1{\@lduseb@x{#1}\set@color}}
  83. \def\Ginclude@eps#1{%
  84. \message{<#1>}%
  85.    \ifGin@clip
  86.      \typeout{no clipping support in pctexps}%
  87.    \fi
  88.    \Gin@req@width.03515\Gin@req@width
  89.    \Gin@req@height.03515\Gin@req@height
  90.    \special{ps:#1\space x=\strip@pt\Gin@req@width cm,
  91.                         y=\strip@pt\Gin@req@height cm}}
  92.  
  93. \def\Ginclude@ps#1{%
  94. \message{<#1>}%
  95.   \ifGin@clip
  96.     \typeout{no clipping support in pctexps}%
  97.   \fi
  98.   \hbox{\kern-\Gin@llx\raise-\Gin@lly\hbox{\special{ps:#1}}}%
  99.   \typeout{^^J%
  100. ---------------------------------------------------------^^J%
  101. .ps graphics without bounding box information cannot be^^J%
  102. scaled.  If the file actually contains the information,^^J%
  103. please rename the file to .eps file extension.^^J%
  104. ---------------------------------------------------------^^J}}
  105.  
  106. \def\Gin@extensions{.eps,.ps}
  107. \@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
  108. \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
  109.  
  110. \def\Raw@PS#1{\special{ps::#1}}
  111. \def\Grot@start{%
  112.  \special{ps::gsave currentpoint
  113.  currentpoint translate \Grot@angle\space
  114.  rotate neg exch neg exch translate}}
  115. \def\Grot@end{\special{ps:: currentpoint grestore moveto}}
  116. \def\Gscale@start{\special{ps:: currentpoint currentpoint translate
  117.   \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
  118. \def\Gscale@end{\special{ps::  currentpoint currentpoint translate
  119.   1 \Gscale@x\space div 1 \Gscale@y\space div scale
  120.   neg exch neg exch translate}}
  121. \endinput
  122. %% 
  123. %% End of file `pctexps.def'.
  124.